package com.lyf.scm.plan.api.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lyf.scm.common.model.BaseSearchDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * description:
 * 销售计划
 *
 * @author: haodong
 * @data: 2020/8/7 16:37
 */
@Data
@ApiModel("销售计划DTO")
public class SalesPlanDTO extends BaseSearchDTO {

    @ApiModelProperty("主键id")
    private Long id;

    @ApiModelProperty("需求计划单号")
    private BigDecimal demandPlanNo;

    @ApiModelProperty("销售计划金额")
    private BigDecimal salesPlanAmount;

    @ApiModelProperty("预测计划金额")
    private BigDecimal forecastPlanAmount;

    @ApiModelProperty("销售计划量")
    private BigDecimal salesPlanQty;

    @ApiModelProperty("预测计划量")
    private BigDecimal forecastPlanQty;

    @ApiModelProperty("安全库存量")
    private BigDecimal safetyStockQty;

    @ApiModelProperty("销售计划确认量金额")
    private BigDecimal confirmAmount;

    @ApiModelProperty("确认量")
    private BigDecimal confirmQty;

    @ApiModelProperty("上次确认量")
    private BigDecimal lastConfirmQty;

    @ApiModelProperty("预约在途采购量")
    private BigDecimal reservePurchaseQty;

    @ApiModelProperty("实际销售金额")
    private BigDecimal actualSaleAmount;

    @ApiModelProperty("实际销量")
    private BigDecimal actualSalesQty;

    @ApiModelProperty("实际收货量")
    private BigDecimal actualReceiveQty;

    @ApiModelProperty("未履约采购量")
    private BigDecimal noFulfilPurchaseQty;

    @ApiModelProperty("当前实时库存")
    private BigDecimal realTimeInventoryQty;

    @ApiModelProperty("当前实时库存")
    private String realTimeString;

    @ApiModelProperty("计划开始日期")
    private Date planStartDate;

    @ApiModelProperty("计划结束日期")
    private Date planEndDate;

    @ApiModelProperty("采购单位")
    private Long unitType;

    @JsonIgnore
    @ApiModelProperty("分组参数")
    private String condition;

    @JsonIgnore
    @ApiModelProperty("是否需要查询GMV中的指标")
    private Boolean validGmv;

    @JsonIgnore
    @ApiModelProperty("采购指标分组参数")
    private String purchaseCondition;

    @ApiModelProperty("是否需要显示实时库存指标")
    private Boolean flagRealTimeStock;

    @ApiModelProperty("需求计划")
    private List<SalesPlanDTO> demandPlanDTOS;

    @ApiModelProperty("仓库编码")
    private List<String> warehouseCodes;

    @ApiModelProperty("小品类code——大品类 或 小品类code——中品类code")
    private Map<Long, String> terCodeMapping;

    @ApiModelProperty("仓库对应的区域编码")
    private Map<String,String> warehouseArea;

    @ApiModelProperty("实际收货量")
    private BigDecimal actualReceivedQty;
    /** 计划确认等级，有2、3、4级，如果不是这三个则给默认4级 */
    private int confirmLevel;
    /** 区域聚合等级：1、2、3、4，规则是如果没选查询条件则按权限的最末级聚合，如果选了查询条件则按查询条件的最末一级聚合 */
    private int areaAggregationLevel;
}
